#include <iostream>

//https://www.nowcoder.com/practice/9fecec9c776c436b8a03ba0684ac76a7?tpId=225&tqId=2189028&ru=/exam/oj&qru=/ta/primary-grammar-cpp/question-ranking&sourceUrl=%2Fexam%2Foj%3Fpage%3D1%26tab%3D%25E8%25AF%25AD%25E6%25B3%2595%25E7%25AF%2587%26topicId%3D225

using namespace std;

int getSum(int n) {
    if(n == 1 || n == 2) //n=1或2跳出递归
        return 1;
    return getSum(n - 1) + getSum(n - 2); //返回前两个月相加
}

int main() {
	int n;
	cin >> n;
	cout << getSum(n) << endl; //输出结果
	return 0;
}





